/* Global Styles */
:root {
  --primary-color: #31c27c;
}

body {
  margin: 0;
  background: #f5f5f5;
  font-family: "Microsoft Yahei", sans-serif;
  font-size: 14px;
  min-width: 1200px;
}

a {
  text-decoration: none;
  color: #000;
}

a:hover {
  color: var(--primary-color);
}

.nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Layout */
header {
  height: 90px;
  background: white;
  display: flex;
  align-items: center;
}

.header-inner, main {
  width: 1200px;
  margin: 0 auto;
}

.section {
  margin-top: 40px;
}

footer {
  margin-top: 60px;
  background: #333;
  height: 200px;
}

/* Components */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 30px;
  font-weight: 400;
  margin: 0;
}

.section-nav a {
  margin-left: 30px;
  font-size: 15px;
}

.section-nav a.active {
  color: var(--primary-color);
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 45px 25px;
}

.grid-item .cover-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  margin-bottom: 15px;
  cursor: pointer;
}

.grid-item .cover-wrap::before {
  content: '';
  display: block;
  padding-top: 100%; /* Maintain 1:1 aspect ratio */
}

.grid-item .cover-img,
.grid-item .cover-mask,
.grid-item .cover-play {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.grid-item .cover-img {
  transition: transform 0.75s;
}

.grid-item .cover-mask {
  background: #000;
  opacity: 0;
  transition: opacity 0.5s;
}

.grid-item .cover-play {
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.5s;
  background: url('../imgs/cover_play.png') center center no-repeat;
  background-size: 70px 70px;
}

.grid-item .cover-wrap:hover .cover-mask {
  opacity: 0.2;
}

.grid-item .cover-wrap:hover .cover-play {
  opacity: 1;
  transform: scale(1);
}

.grid-item .cover-wrap:hover .cover-img {
  transform: scale(1.07);
}

.grid-item .item-title {
  display: block;
  margin-bottom: 8px;
}

.grid-item .item-info {
  color: #999;
}

.song-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.song-item {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s;
  position: relative;
}

.song-item:hover {
  background-color: #ebebeb;
}

.song-item .cover {
  width: 60px;
  height: 60px;
  margin-right: 14px;
  flex-shrink: 0;
}

.song-item .info {
  flex-grow: 1;
  overflow: hidden;
}

.song-item .title {
  font-size: 14px;
}

.song-item .singer {
  font-size: 13px;
  color: #999;
  margin-top: 8px;
}

.song-item .duration {
  font-size: 13px;
  color: #a2a2a2;
  margin-left: 14px;
}

.song-item .play-icon {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: url('../imgs/cover_play.png') center center no-repeat;
  background-size: contain;
  opacity: 0;
  transition: opacity 0.3s;
}

.song-item:hover .play-icon {
  opacity: 0.8;
}
